Skip to content

优化启动器崩溃处理机制 - #6825

Open
CiiLu wants to merge 6 commits into
HMCL-dev:mainfrom
CiiLu:y
Open

优化启动器崩溃处理机制#6825
CiiLu wants to merge 6 commits into
HMCL-dev:mainfrom
CiiLu:y

Conversation

@CiiLu

@CiiLu CiiLu commented Sep 6, 2026

Copy link
Copy Markdown
Contributor
  1. 移除目前的崩溃分析机制。目前大部分规则已经过期,且正确率极低。且目前如果分析出了原因只会显示仅有原因的 Alert。在崩溃群或用户群遇到这种还得引导用户使用命令行启动 hmcl 或手动寻找日志文件,交流成本极高。
  2. 在崩溃窗口添加导出启动器日志按钮
  3. 多次出现错误时在现有窗口追加内容,避免部分频繁处理的逻辑(如加载游戏版本)出错一次性出现一大堆崩溃窗口。

@github-actions github-actions Bot added the 100+ label Sep 6, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Static analysis found the following issues (max count 10):

/**
* @author huangyuhui
*/
public class CrashWindow extends Stage {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ERROR] [com.puppycrawl.tools.checkstyle.checks.design.FinalClassCheck]

Class CrashWindow should be declared as final.

}


public void addCrashReport(CrashReport report) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ERROR] [com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck]

'METHOD_DEF' has more than 1 empty lines before.




public static Path exportLogsAsZip() throws IOException {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ERROR] [com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck]

'METHOD_DEF' has more than 1 empty lines before.

}


private static String getEntryName(Set<String> entryNames, String name) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ERROR] [com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck]

'METHOD_DEF' has more than 1 empty lines before.

@Glavo

Glavo commented Sep 6, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T12:23:52.979112Z b6a36d6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6a36d69dc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

btnExport.setOnAction(event -> {
exportPane.getChildren().setAll(progressIndicator);
try {
Path path = LauncherLogExporter.exportLogsAsZip();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run the log export off the JavaFX application thread

When retained logs are large, compressed, or stored on a slow filesystem, this call scans, decompresses, and recompresses up to five files and waits for Logger.exportLogs directly inside the button's JavaFX action handler. The FX pulse therefore cannot render the progress indicator, the crash window remains unresponsive, and subsequent queued crash reports cannot appear until the export finishes. Dispatch the export to Schedulers.io() and return to the JavaFX executor for the dialog and button update, as the settings-page export already does.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants